#pragma once

#include "Ogre.h"
#include "OgreConfigFile.h"

using namespace Ogre;

class CSysRender
{
private:
	Root *m_pRoot;
	Camera* mCamera;
	SceneManager* mSceneMgr;
	RenderWindow* mWindow;
	Ogre::String mResourcePath;
	HWND m_hAttach;

	virtual bool setup(void);
	virtual bool configure(void);
	virtual void chooseSceneManager(void);
	virtual void createCamera(void);
	virtual void createFrameListener(void);
	virtual void createViewports(void);
	virtual void setupResources(void);
	virtual void createResourceListener(void);
	virtual void loadResources(void);
	virtual void createWindow(const char* pName,HWND hWnd);
	
	virtual void createScene(void) {};    // pure virtual - this has to be overridden
	virtual void destroyScene(void){}    // Optional to override this
public:
	CSysRender(void);
	virtual ~CSysRender(void);

	void Init(HWND hWnd);
	void Render();
	void Deinit();

	void Resize(int x,int y,int lx,int ly);
};
